﻿using System.Collections.Generic;

namespace K9Nano.Authorization;

public interface IPermissionCatalog
{
    IEnumerable<Permission> Permissions { get; }

    IPermissionCatalog Add(Permission permission);

    bool TryAdd(Permission permission);

    IPermissionCatalog Add(string group, string name, string description) => Add(new Permission { Group = group, Name = name, Description = description });
}
